<?php

namespace Addons\Zmphoto\Controller;

use Home\Controller\AddonsController;

class BaseController extends AddonsController {
	function _initialize() {
		parent::_initialize ();
		
		  $controller = _CONTROLLER;
		
		$res ['title'] = '活动列表';
		$res ['url'] = addons_url ( 'Zmphoto://Zmphoto/lists' );
		$res ['class'] = ($controller == 'PhotoActivity' && _ACTION == "lists") ? 'current' : '';
		$nav [] = $res;

		$res ['title'] = '数据列表';
		$res ['url'] = addons_url ( 'Zmphoto://PhoneData/lists' );
		$res ['class'] = ($controller == 'PhoneData' && _ACTION == "lists") ? 'current' : '';
		$nav [] = $res;

		$res ['title'] = '摄影者管理';
		$res ['url'] = addons_url ( 'Zmphoto://PhotoGl/lists' );
		$res ['class'] = ($controller == 'PhotoGl' && _ACTION == "lists") ? 'current' : '';
		$nav [] = $res;

		$res ['title'] = '活动数据统计';
		$res ['url'] = addons_url ( 'Zmphoto://Statistics/lists' );
		$res ['class'] = ($controller == 'Statistics' && _ACTION == "lists") ? 'current' : '';
		$nav [] = $res;

		$res ['title'] = '意见反馈';
		$res ['url'] = addons_url ( 'Zmphoto://InfoReview/lists' );
		$res ['class'] = ($controller == 'InfoReview' && _ACTION == "lists") ? 'current' : '';
		$nav [] = $res;
		
		$this->assign ( 'nav', $nav );

		define ( 'CUSTOM_TEMPLATE_PATH', ONETHINK_ADDON_PATH . 'Shop/View/default/Wap/Template' );
	}
}
